<%-- 
    Document   : event
    Created on : Dec 2, 2012, 5:23:21 PM
    Author     : mruiz
--%>

<%@page import="com.es.bxip.service.DealService"%>
<%@page import="com.es.bxip.domain.Deal"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Bxip - Event</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- Le styles -->
        <link href="resources/css/style.css" rel="stylesheet">
        <script src="resources/js/jquery.js"></script>
        <script src="resources/js/bootstrap.min.js"></script>
        <script src="resources/js/bootstrap-datepicker.js"></script>
        <script src="resources/js/js.js"></script>
        <script src="resources/js/bxipjs.js"></script>
        <script src="resources/media/js/jquery.dataTables.js"></script>
        <style>
            body {
                padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
            }
        </style>
        <link href="resources/css/bootstrap-responsive.css" rel="stylesheet">
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

    </head>
    <body>

        <jsp:include page="header.jsp"/>


        <%
            String dealID = request.getParameter("id");
            Deal d = new Deal();
            if (dealID != null) {
                Integer id = new Integer(dealID);
                d = DealService.getDealById(id);
            }
        %>

        <div class="container offset1">

            <div class="row">
                <div class="span2">
                    <a href="#" class="thumbnail">
                        <img src="https://upload.wikimedia.org/wikipedia/commons/d/df/Gnome_globe_current_event.svg" height="180" width="260" alt="Deal image">
                    </a>
                </div>
                <div id="deal_description" style="min-height: 270px" class="span5">
                    <p><h3><%=d.getTitle()%></p></h3>
                    <p> <i class="icon-book"> </i> <%
                        String des = d.getDescription();
                        if (des.length() > 500) {
                            des = d.getDescription().substring(0, 499);
                        }

                        out.println(des);
                        %></p>
                    <p>
                    <div class="row">
                        <div class="span3">
                            <i class="icon-tags"> </i> Tags: 
                            <%                                if (d.getTags() != null)
                                    for (String tag : d.getTags()) {%>
                            <a href="index.jsp?selected_tags=<%=tag%>"><span class="label label-info"><%out.println(tag);%></span></a> <%}%>

                        </div>
                    </div>
                </div>


                <div class="span3 well">

                    <div class="span2">
                        <h4> <i class="icon-barcode"> </i> Price <%=d.getPrice()%> </h4>
                    </div>
                    <hr>
                    <div class="span2">
                        <p> <i class="icon-calendar"> </i> <i>Desde </i> <b><%=d.getFechaInicio()%></b> <i> hasta </i> <b><%=d.getFechaFin()%></b></p>
                    </div>
                    </br>
                    </br>
                    <hr>
                    <div class="span2">
                        <iframe src="//www.facebook.com/plugins/follow.php?href=https%3A%2F%2Fwww.facebook.com%2Fzuck&amp;layout=standard&amp;show_faces=true&amp;colorscheme=light&amp;font=arial&amp;width=200&amp;appId=483846881678896" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px;" allowTransparency="true"></iframe>   
                    </div>




                </div>

            </div>




            <hr>
            <div class="abbable span9">
                <ul class="nav nav-tabs">
                    <li  class="active"><a href="#pane1" data-toggle="tab"> <i class="icon-map-marker"> </i>  Localización</a></li>
                    <li><a href="#pane2" data-toggle="tab"><i class="icon-comment"> </i>  Comentarios</a></li>
                    <li><a href="#pane3" data-toggle="tab"><i class="icon-gift"> </i>  Ofertas</a></li>
                </ul>
                <div class="tab-content">

                    <div id="pane1" class="tab-pane active">
                        <div class="span3">
                            Dirección:
                            <%=d.getLugar()%>
                        </div>
                        <div class="span3">
                            <img src="http://1.bp.blogspot.com/_EwqPoNGCqQY/TNMQrZrCoLI/AAAAAAAAAAQ/K5-NJI-LSVk/s1600/google_maps.gif"/>
                        </div>
                    </div>
                    <div id="pane2" class="tab-pane">
                        <h4>Comentarios</h4>
                        <div class="span3">
                            <small><i>Comentarios no disponibles en esta version</i></small>
                        </div>
                    </div>
                    <div id="pane3" class="tab-pane">
                        <div class="span3">
                            <i>Ninguna oferta disponible</i>
                        </div>
                    </div>



                </div><!-- /.tab-content -->
            </div><!-- /.tabbable -->     

        </div>
    </div>

    <!--        <div id="event_comments">
                <form action="">
                    <textarea id="post_comment" name="comment" cols="500" style="width: 40%;">  Post a comment </textarea>
                    <button onclick="postComment()" class="btn"> Public </button>
                </form>
            </div>-->
    <!--TODO: CSS change this shit ->--> 
    <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
    <jsp:include page="footer.jsp"/>      
</body>
</html>
